package com.it.travel.controller;

import com.it.travel.service.HotelService;
import com.it.travel.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/hotel")
@CrossOrigin
@Slf4j
public class HotelController {

    @Resource
    private HotelService hotelService;

    @GetMapping("/{num}")
    public Result<?> getHotelInfo(@PathVariable("num") Integer num) {
        log.info("{}", num);
        Result<?> result = hotelService.getHotelInfo(num);
        return result;

    }
}
